package com.ruoyi.merchant.service.impl;

import java.util.Collections;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.merchant.mapper.MerchantActivitiesMapper;
import com.ruoyi.merchant.domain.MerchantActivities;
import com.ruoyi.merchant.service.IMerchantActivitiesService;

/**
 * 商家活动Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-09-17
 */
@Service
public class MerchantActivitiesServiceImpl implements IMerchantActivitiesService 
{
    @Autowired
    private MerchantActivitiesMapper merchantActivitiesMapper;

    /**
     * 查询商家活动
     * 
     * @param id 商家活动主键
     * @return 商家活动
     */
    @Override
    public MerchantActivities selectMerchantActivitiesById(Integer id)
    {
        return merchantActivitiesMapper.selectMerchantActivitiesById(id);
    }

    /**
     * 查询商家活动列表
     * 
     * @param merchantActivities 商家活动
     * @return 商家活动
     */
    @Override
    public List<MerchantActivities> selectMerchantActivitiesList(MerchantActivities merchantActivities)
    {
        return merchantActivitiesMapper.selectMerchantActivitiesList(merchantActivities);
    }

    /**
     * 新增商家活动
     * 
     * @param merchantActivities 商家活动
     * @return 结果
     */
    @Override
    public int insertMerchantActivities(MerchantActivities merchantActivities)
    {
        return merchantActivitiesMapper.insertMerchantActivities(merchantActivities);
    }

    /**
     * 修改商家活动
     * 
     * @param merchantActivities 商家活动
     * @return 结果
     */
    @Override
    public int updateMerchantActivities(MerchantActivities merchantActivities)
    {
        return merchantActivitiesMapper.updateMerchantActivities(merchantActivities);
    }

    /**
     * 批量删除商家活动
     * 
     * @param ids 需要删除的商家活动主键
     * @return 结果
     */
    @Override
    public int deleteMerchantActivitiesByIds(Integer[] ids)
    {
        return merchantActivitiesMapper.deleteMerchantActivitiesByIds(ids);
    }

    /**
     * 删除商家活动信息
     * 
     * @param id 商家活动主键
     * @return 结果
     */
    @Override
    public int deleteMerchantActivitiesById(Integer id)
    {
        return merchantActivitiesMapper.deleteMerchantActivitiesById(id);
    }

    @Override
    public List<MerchantActivities> selectMerchantActivitiesList2(MerchantActivities merchantActivities, Long userId) {
        return merchantActivitiesMapper.selectMerchantActivitiesList2(merchantActivities, userId);
    }
}
